from rest_framework import serializers
from .models import Package, Privilege



class PrivilegeSerializer(serializers.ModelSerializer):
    class Meta:
        model = Privilege
        fields = "__all__"

class PackageSerializer(serializers.ModelSerializer):
    privileges = PrivilegeSerializer(many=True)

    class Meta:
        model = Package
        fields = "__all__"
